-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[venstarthermostat] Add more channels provided by the local API #11305
[venstarthermostat] Add more channels provided by the local API #11305
Conversation
Signed-off-by: raveydavies <matthew.davies@skynet.be>
Signed-off-by: raveydavies <matthew.davies@skynet.be>
Signed-off-by: raveydavies <matthew.davies@skynet.be>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks so much for these improvements!!!! I'm scratching my head wondering why we did not at least implement Fan mode and state, as those seem pretty useful, so i think your changes will be well received!
I added some feedback, mostly small stuff.
A note about the Runtime history. It looks like the API is sending the last 7 days of runtime history. The timestamp for the last day is always right now, which makes sense as its the current runtime of each type until right now from the last entry, once midnight happens, it becomes yesterday's values (so the timestamp remains the same and its now not the last entry in that array).
I could see just having this last entry (current runtime) could be useful for historic reasons and graphing (so putting values in grafana, rrd, etc...). In this case i would update the documentation to make this more clear, as the timestamp is confusing why it's alway right now and that also the runtime values start at midnight. It confused me, which is why i went looking a little deeper.
We could also add channels for each of the last 7 days, this would be great for users wanting to display this info on their OH UI. If we could start over, adding channel groups might have been nice, but you can't mix them in now. I would vote for this option if you want to keep the runtime functionality. In this case your channels might look like
<channel id="day0Heat1Runtime" typeId="heat1Runtime"/>
<channel id="day1Heat1Runtime" typeId="heat1Runtime"/>
<channel id="day2Heat1Runtime" typeId="heat1Runtime"/>
....
<channel id="day0Cool2Runtime" typeId="cool2Runtime"/>
<channel id="day1Cool2Runtime" typeId="cool2Runtime"/>
<channel id="day2Cool2Runtime" typeId="cool2Runtime"/>
...
and so on. WDYT?
| scheduleModeRaw | Number | Current Schedule mode Raw (Read Only)| 0(Disabled) 1(Enabled) | | ||
| schedulePart | String | Current Schedule Part | | | ||
| schedulePartRaw | Number | Schedule Part Raw (Read Only)|0(Morning) 1(Day) 2(Evening) 3 (Night) 255 (Inactive) | | ||
| timestampRuntime | DateTime | Time Stamp of last RT update |Binding only looks at the last day runtime | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, i would replace all the RT
abbreviations with Runtime
to make this more clear to users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I will update it. By the way, how does this formatting of a table in Markdown (in Eclipse) work? Is there a tutorial on it somewhere? I'm not familiar at all with this stuff, so I was kind of trying to fit RT into a column, probably not necessary :-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So put everything you want into the table, don't worry about formatting too much, then before you push your changes, use http://markdowntable.com/ to have it format your table with the correct spacing and such. This is how i do it, others may have a different approach. Eclipse has a very poor markdown editor and previewer.
<state readOnly="true" pattern="%d mins"/> | ||
</channel-type> | ||
|
||
<channel-type id="freecoolRuntime" advanced="false"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<channel-type id="freecoolRuntime" advanced="false"> | |
<channel-type id="freeCoolRuntime" advanced="false"> |
Since "Free Cool" is two words, lets keep the camelCase pattern (and update the README as well).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK will update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs to be fixed as well
return z; | ||
} | ||
|
||
private int getHeat1Runtime(VenstarRuntime runtime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these functions where you pass in the runtime are unnecessary, you can remove all of them and just call runtime.getHeat1()
or other functions on the runtime object where you need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was copying the approach that was in the code already. Yes, it seems a bit silly unless they are public functions.
@@ -338,23 +394,80 @@ private VenstarAwayMode getAwayMode() { | |||
return infoData.getAway(); | |||
} | |||
|
|||
private void updateSettings(VenstarAwayMode away) { | |||
private VenstarFanMode getFanMode() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So i don't know why we have these private functions that just duplicate the functions inside objects we hold here. If you want to just remove all of these, that would be great (not sure why i did not catch them when i got involved) For example anywhere that is calling getFanMode()
can just use infoData.getFanMode()
. If these were public i might seen a reason for them, but they are not and its just redundant code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. I'll delete them, they are causing me a lot of unnecessary scrolling when I'm coding, it's driving me crazy.
* @author Matthew Davies - Class added to add more functionality to binding | ||
*/ | ||
public class VenstarRuntime { | ||
int ts; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timestamps should be stored as a long vs an int
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I will update it. Why is that? Coding convention because the number will eventually become very big?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this will overrun a int
in something like 2038 , which while a long while off, its still better to have consistency in coding conventions other wise we get a mess of ints and longs all over the place.
|
||
private ZonedDateTime getTimestampRuntime(VenstarRuntime runtime) { | ||
ZonedDateTime z = ZonedDateTime.ofInstant(Instant.ofEpochSecond(runtime.getTimeStamp()), | ||
ZoneId.systemDefault()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it looks like this is reported in the user's timezone (or at least the time zone the device is set in) , so no need to convert to the system default time zone (or use GMT if you have to pass a timezone) . But this is actually more tricky as the runtime schedules are more complicated, i'll post that in another comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was struggling with this due to lack of familiarity with timestamps, epoch, etc (I'm really an amateur....). What should I put as the function argument to Instant.ofEpochSecond() instead of "ZoneId.systemDefault()"? It's very confusing. I also noticed the time displayed in the channel was 2 hours ahead of my home time zone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this still needs to be resolved , or the time is always going to be off.
So this is kinda tricky, but i think you need to offset this back to UTC and then create a ZoneDate time. Dealing with time zones is always painful.
So maybe something like....
ZoneId zoneId = ZoneId.systemDefault();
ZonedDateTime now = LocalDateTime.now().atZone(zoneId);
int diff = now.getOffset().getTotalSeconds();
ZonedDateTime z = ZonedDateTime.ofInstant(Instant.ofEpochSecond(runtime.getTimeStamp() -diff), zoneId);
Thanks for the comments!! I will take a look at them in detail later today when I have some free time. About the runtimes....I was also wondering about including them all, it should be fairly easy to do. What's a channel group? |
See https://www.openhab.org/docs/developer/bindings/thing-xml.html#channel-groups , it allows you to define a group of channel types once and then refer to it many times (once for each day in this case). Unfortunately you either use ONLY channel groups OR individual channels, you can't mix them in a binding, so adding them would mean we break backwards compatibility for users. I think its ok, just means a little more copy and pasting in the thing xml file for each day, but in your code you can loop through the days and dynamically refer to the channels like (warning untested): private static final String CHANNEL_FMT = "day%d_%s";
....
Collections.reverse(runtimes);
for (int i = 0; i < 7; i++) {
VenstarRuntime rt = null;
if (i < runtimes.size()) {
rt = runtimes.get(i);
}
updateIfChanged(String.format(CHANNEL_FMT, i, CHANNEL_TIMESTAMP_RUNTIME),
rt == null ? UnDefType.UNDEF : new DateTimeType(getTimestampRuntime(lastRuntime)));
updateIfChanged(String.format(CHANNEL_FMT, i, CHANNEL_HEAT1_RUNTIME),
rt == null ? UnDefType.UNDEF : new DecimalType(rt.getHeat1()));
updateIfChanged(String.format(CHANNEL_FMT, i, CHANNEL_HEAT2_RUNTIME),
rt == null ? UnDefType.UNDEF : new DecimalType(rt.getHeat2()));
updateIfChanged(String.format(CHANNEL_FMT, i, CHANNEL_COOL1_RUNTIME),
rt == null ? UnDefType.UNDEF : new DecimalType(rt.getCool1()));
updateIfChanged(String.format(CHANNEL_FMT, i, CHANNEL_COOL2_RUNTIME),
rt == null ? UnDefType.UNDEF : new DecimalType(rt.getCool2()));
updateIfChanged(String.format(CHANNEL_FMT, i, CHANNEL_AUX1_RUNTIME),
rt == null ? UnDefType.UNDEF : new DecimalType(rt.getAux1()));
updateIfChanged(String.format(CHANNEL_FMT, i, CHANNEL_AUX2_RUNTIME),
rt == null ? UnDefType.UNDEF : new DecimalType(rt.getAux2()));
updateIfChanged(String.format(CHANNEL_FMT, i, CHANNEL_FC_RUNTIME),
rt == null ? UnDefType.UNDEF : new DecimalType(rt.getFC()));
} I'm assuming there may not always be 7 days (like when its reset or something) |
Yes I agree with this as well. Do you think the timestamps are needed? Or would it be better to just have channels labeled "Today Heat1 Runtime", "Yesterday Heat1 Runtime", " 2 days ago Heat1 Runtime"........? |
It couldn't hurt, I would just mark the channel as "advanced" so it not shown by default in the UI
Yes, exactly ! The labels and Readme can more clearly state "Today, Yesterday, 2 Days ago, 3 Days ago,......" and so on. |
@digitaldan I'm working on the above changes. It will take me a couple of days. I'll commit the code when it's done and tested. |
Signed-off-by: raveydavies <matthew.davies@skynet.be>
@digitaldan did my last commit come through OK? Something strange happened at my end, but to me it looks OK. |
|
||
runtimeData = Objects.requireNonNull(gson.fromJson(response, VenstarRuntimeData.class)); | ||
List<VenstarRuntime> runtimes = runtimeData.getRuntimes(); | ||
String[] timestamps = { CHANNEL_TIMESTAMP_RUNTIME_DAY0, CHANNEL_TIMESTAMP_RUNTIME_DAY1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't want to dynamically reference a single set of base channels vars like CHANNEL_TIMESTAMP_RUNTIME_DAY + i
thats fine, but theres a lot more code being copied and pasted around which is not my fav. If you do want to keep all these extra channels variables, arrays like these should be moved to VenstarThermostatBindingConstants
or to the top of this file and be declared static final
with the variable names in all caps (like other static final vars) so they are only created once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it's getting messy. I didn't like it when I programmed it, but I'm not sure how to resolve it (your CHANNEL_NAME+i won't work, will it?). I was actually wondering if it would be cleaner just to provide the runtime string, and let users do whatever they want with it (with some explanation of the String content in the documentation). I suspect anyone trying to do anything with this data will be quite "hardcore" anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would that not work? If you define a Variable like
public static final String CHANNEL_TIMESTAMP_RUNTIME_DAY = "timestampDay";
then in a loop set then channel String value to
updateIfChanged(CHANNEL_TIMESTAMP_RUNTIME_DAY + i, new DateTimeType(getTimestampRuntime(rt)));
Then the channel name is going to be
timestampDay0
timestampDay1
timestampDay2
....
adding a String to a int results in concatenating the two together as essentially 2 strings. And you save yourself a whole lot of code to maintain. If we were doing this 1000's of time per second, then i agree having static tables would be more efficient , but if performance is not a issue, i would error on the side of maintainability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!! Sounds good....I will update it. I guess I had somehow forgotten the variable values are strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about just providing the runtime string as it comes directly from the thermostat, as a simplification? I suppose as I've already done a lot of code around this, it's not worth reversing :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about just providing the runtime string as it comes directly from the thermostat,
Not sure what you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just thinking it would be simpler to provide the raw json response from '.../query/runtimes' and let people do whatever they want with it with a JSON / Regex transformation operation. That would avoid all the extra channels and code we currently have (I don't like the fact the binding currently has 56 channels and 2 classes for this - it's messy :-O). A json probably wouldn't be too difficult to handle for people that are likely to use the data (it's not really core thermostat functionality). The thermostat also gives alarms in a similar format, which would again require multiple channels and classes unless a JSON response is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, returning raw JSON is not a great choice here. I am fine with the extra channels and classes, you can mark them as advanced, and they won't show up by default in the UI, so it should not intimidate users. Returning in JSON will ensure very few people would ever use this. Again, if you dynamically create the channel names as we discussed a few times, then its just the thing XML which is long, but there are definitely bindings with more in them, so not out of the ordinary .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@digitaldan OK. I did the updates you suggested anyway. They are in my latest commit/push in this pull request.
...in/java/org/openhab/binding/venstarthermostat/internal/handler/VenstarThermostatHandler.java
Show resolved
Hide resolved
String[] aux2Runtimes = { CHANNEL_AUX2_RUNTIME_DAY0, CHANNEL_AUX2_RUNTIME_DAY1, CHANNEL_AUX2_RUNTIME_DAY2, | ||
CHANNEL_AUX2_RUNTIME_DAY3, CHANNEL_AUX2_RUNTIME_DAY4, CHANNEL_AUX2_RUNTIME_DAY5, | ||
CHANNEL_AUX2_RUNTIME_DAY6 }; | ||
String[] fCRuntimes = { CHANNEL_FC_RUNTIME_DAY0, CHANNEL_FC_RUNTIME_DAY1, CHANNEL_FC_RUNTIME_DAY2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
String[] fCRuntimes = { CHANNEL_FC_RUNTIME_DAY0, CHANNEL_FC_RUNTIME_DAY1, CHANNEL_FC_RUNTIME_DAY2, | |
String[] fcRuntimes = { CHANNEL_FC_RUNTIME_DAY0, CHANNEL_FC_RUNTIME_DAY1, CHANNEL_FC_RUNTIME_DAY2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it should be fC like the individual variable names. Why not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b/c you clearly use fc as a single word here CHANNEL_FC_RUNTIME_DAY0
not CHANNEL_F_C_RUNTIME_DAY0
, and i agree FC
is better then F_C
|
||
private ZonedDateTime getTimestampRuntime(VenstarRuntime runtime) { | ||
ZonedDateTime z = ZonedDateTime.ofInstant(Instant.ofEpochSecond(runtime.getTimeStamp()), | ||
ZoneId.systemDefault()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this still needs to be resolved , or the time is always going to be off.
So this is kinda tricky, but i think you need to offset this back to UTC and then create a ZoneDate time. Dealing with time zones is always painful.
So maybe something like....
ZoneId zoneId = ZoneId.systemDefault();
ZonedDateTime now = LocalDateTime.now().atZone(zoneId);
int diff = now.getOffset().getTotalSeconds();
ZonedDateTime z = ZonedDateTime.ofInstant(Instant.ofEpochSecond(runtime.getTimeStamp() -diff), zoneId);
Signed-off-by: raveydavies <matthew.davies@skynet.be>
@digitaldan I've made updates according to the comments, I think I addressed everything. Thanks for the coaching.....it's very useful for a self-taught programmer who never needed to code to any kind of standard or go through any peer review before :-) |
No worries, these are nice enhancements, and i'm happy to help. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi , sorry for the delay, didn't catch you had made updates, see my review notes for latest round of feedback, thanks !
ZonedDateTime now = LocalDateTime.now().atZone(zoneId); | ||
int diff = now.getOffset().getTotalSeconds(); | ||
ZonedDateTime z = ZonedDateTime.ofInstant(Instant.ofEpochSecond(runtime.getTimeStamp() - diff), zoneId); | ||
// ZonedDateTime z = ZonedDateTime.ofInstant(Instant.ofEpochSecond(runtime.getTimeStamp()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove commented out code
@@ -93,10 +108,19 @@ | |||
|
|||
private static final int TIMEOUT_SECONDS = 30; | |||
private static final int UPDATE_AFTER_COMMAND_SECONDS = 2; | |||
private static final String CHANNEL_TIMESTAMP_RUNTIME_DAY = "timestampDay"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put these in VenstarThermostatBindingConstants
public static final String CHANNEL_SCHEDULE_MODE_RAW = "scheduleModeRaw"; | ||
public static final String CHANNEL_SCHEDULE_PART = "schedulePart"; | ||
public static final String CHANNEL_SCHEDULE_PART_RAW = "schedulePartRaw"; | ||
public static final String CHANNEL_TIMESTAMP_RUNTIME_DAY0 = "timestampDay0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove all of the CHANNEL_xxx_xxx_Dayx
strings as they are no longer referenced anywhere.
| scheduleMode | String | Current Schedule Mode | | | ||
| scheduleModeRaw | Number | Current Schedule mode Raw (Read Only) | 0(Disabled) 1(Enabled) | | ||
| schedulePart | String | Current Schedule Part | | | ||
| schedulePartRaw | Number | Schedule Part Raw (Read Only) |0(Morning) 1(Day) 2(Evening) 3 (Night) 255 (Inactive) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, but will come up with other reviewers as well, run the table through a formatter or manually fix the spacing issue on this line.
<state readOnly="true" pattern="%d mins"/> | ||
</channel-type> | ||
|
||
<channel-type id="freecoolRuntime" advanced="false"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs to be fixed as well
Signed-off-by: raveydavies <matthew.davies@skynet.be>
@digitaldan Hi - I updated as per your review. I think I have finally got the freeCool camelCase right and the same everywhere!! I also made all the Runtime channels advanced. Everything seems to be working correctly with my thermostat. Let me know if anything else is needed. Thanks again. |
@digitaldan just wondering if it's worth including the "alerts" provided by the API while we're at it. I think that's the only functionality which is not included now, apart from some data only applicable on commercial devices. WDYT? |
HI looks good! There are some checkstyle warnings you can find in
That sounds great, but let's open another PR for that and get this one merged in the meantime. |
Signed-off-by: raveydavies <matthew.davies@skynet.be>
@digitaldan Thanks!! I can't see what the problem is with the checkstyle warnings about first author, in the Runtime and RuntimeData classes. What am I missing? I've corrected the other ones and pushed again. |
I've fixed those. See my last commit. I previously also saw a warning about first author contribution but that's gone now. All should be fine with my last commit. |
Signed-off-by: raveydavies <matthew.davies@skynet.be>
@lolodomo I think I addressed all your comments this time. Not sure what to do about the @NonNullByDefault for the serializer classes - the JsonDeserializer interface would need to be modified. Thanks for the detailed feedback, and for catching some of my really silly mistakes. |
...c/main/java/org/openhab/binding/venstarthermostat/internal/dto/VenstarFanModeSerializer.java
Outdated
Show resolved
Hide resolved
@raveydavies : this is almost ok now. Please fix the two minor comments you did not handle properly (comments marked as not yet resolved) and consider the last one I just added about handling |
Oops. I missed those other calls to the fromInt method. I will correct them. What do you mean about the types of channels? What are you referring to? |
I mean the kind of item attached to the channel. It can be a switch, a string, a number, ... You chose "String" while I think "Switch" would have been more appropriate. You just made a choice, this is not a bug. |
Signed-off-by: raveydavies <matthew.davies@skynet.be>
@lolodomo updated again as per your review. Change the FanState Type to a switch, and added Exception Handling in the Serializer classes. Hope it's OK now....it works with my thermostat. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @raveydavies |
@kaikreuzer : that is noted for next times. |
@lolodomo Many thanks. I know that this isn't documented anywhere and I should have mentioned this upfront, sorry for missing out on it. |
Thanks @lolodomo @digitaldan for all for the help and feedback. It was tough for me to get that right, but we got there 😅. I learned a lot again. |
@lolodomo I noticed a documentation error related to this PR. I forgot to change the item type for fan state to a Switch in the doc after changing it in the code. Is there a way to quickly update it or do I need to create another issue / PR? |
Yes please create a new PR. |
…1305) * Adding several functions to binding to mimic local API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Adding functionality according to API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updating Read me with new capability Signed-off-by: raveydavies <matthew.davies@skynet.be> * Additional commit with requested changes to pull request Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address all comments on previous commit. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates as requested in review. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Corrections for check style warnings Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address feedback from lolodomo. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Changes to address feedback from lolodomo's review Signed-off-by: raveydavies <matthew.davies@skynet.be> * FanState changed to Switch, Exception handling added as per review. Signed-off-by: raveydavies <matthew.davies@skynet.be> Signed-off-by: Nick Waterton <n.waterton@outlook.com>
…1305) * Adding several functions to binding to mimic local API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Adding functionality according to API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updating Read me with new capability Signed-off-by: raveydavies <matthew.davies@skynet.be> * Additional commit with requested changes to pull request Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address all comments on previous commit. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates as requested in review. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Corrections for check style warnings Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address feedback from lolodomo. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Changes to address feedback from lolodomo's review Signed-off-by: raveydavies <matthew.davies@skynet.be> * FanState changed to Switch, Exception handling added as per review. Signed-off-by: raveydavies <matthew.davies@skynet.be> Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
…1305) * Adding several functions to binding to mimic local API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Adding functionality according to API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updating Read me with new capability Signed-off-by: raveydavies <matthew.davies@skynet.be> * Additional commit with requested changes to pull request Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address all comments on previous commit. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates as requested in review. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Corrections for check style warnings Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address feedback from lolodomo. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Changes to address feedback from lolodomo's review Signed-off-by: raveydavies <matthew.davies@skynet.be> * FanState changed to Switch, Exception handling added as per review. Signed-off-by: raveydavies <matthew.davies@skynet.be>
…1305) * Adding several functions to binding to mimic local API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Adding functionality according to API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updating Read me with new capability Signed-off-by: raveydavies <matthew.davies@skynet.be> * Additional commit with requested changes to pull request Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address all comments on previous commit. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates as requested in review. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Corrections for check style warnings Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address feedback from lolodomo. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Changes to address feedback from lolodomo's review Signed-off-by: raveydavies <matthew.davies@skynet.be> * FanState changed to Switch, Exception handling added as per review. Signed-off-by: raveydavies <matthew.davies@skynet.be>
…1305) * Adding several functions to binding to mimic local API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Adding functionality according to API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updating Read me with new capability Signed-off-by: raveydavies <matthew.davies@skynet.be> * Additional commit with requested changes to pull request Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address all comments on previous commit. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates as requested in review. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Corrections for check style warnings Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address feedback from lolodomo. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Changes to address feedback from lolodomo's review Signed-off-by: raveydavies <matthew.davies@skynet.be> * FanState changed to Switch, Exception handling added as per review. Signed-off-by: raveydavies <matthew.davies@skynet.be>
…1305) * Adding several functions to binding to mimic local API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Adding functionality according to API Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updating Read me with new capability Signed-off-by: raveydavies <matthew.davies@skynet.be> * Additional commit with requested changes to pull request Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address all comments on previous commit. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates as requested in review. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Corrections for check style warnings Signed-off-by: raveydavies <matthew.davies@skynet.be> * Updates to address feedback from lolodomo. Signed-off-by: raveydavies <matthew.davies@skynet.be> * Changes to address feedback from lolodomo's review Signed-off-by: raveydavies <matthew.davies@skynet.be> * FanState changed to Switch, Exception handling added as per review. Signed-off-by: raveydavies <matthew.davies@skynet.be> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
<[Venstarthermostat] adding more functionality to match the local API>
<This Pull Request adds several enhancements to the Venstar Thermostat binding, as per enhancement issue 10823
#10823
Functionality added copies the functionality of the local API and is:
Fan Mode
Fan State
Schedule Mode
Schedule Part
Time Stamp for Run Time
Run Time in heat 1 mode
Run Time in heat 2 mode
Run Time in cool 1 mode
Run Time in cool 2 mode
Run Time in Aux 1 mode
Run Time in Aux 2 mode
Run Time in Free Cool mode
README is updated
<The updates have been tested in the Eclipse openHAB environment, and also on my Raspberry Pi with OpenHAB, using my thermostat device. I have a very simple heating system (central heating boiler), so could not test some channels with real equipment, but I have checked all channels update properly according to commands and the thermostat changes accordingly.